import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/admin/group/getList',
    method: 'get',
    params
  })
}

export function setStatus(id) {
  return request({
    url: '/admin/group/status',
    method: 'post',
    data: {
      id: id
    }
  })
}

// 设为推荐
export function setRcmd(id, weight) {
  return request({
    url: '/admin/group/setRcmdWeight',
    method: 'post',
    data: {
      id: id, // 群ID
      weight: weight // 权重
    }
  })
}

// 获取群成员
export function members(params) {
  return request({
    url: '/admin/group/members',
    method: 'post',
    params
  })
}

export function add(data) {
  return request({
    url: '/admin/file/apiAdd',
    method: 'post',
    data: data
  })
}

